/*------------------------------------------------------------------------------
 * PROJ : Prototype
 * NAME : sculove.spring.zzz.login.model.UserDTO.java
 *        
 * Copyright 2009 sculove All rights reserved
 *------------------------------------------------------------------------------
 */
package sculove.spring.zzz.login.model;
 
import org.springframework.validation.Errors;
import org.springframework.validation.ValidationUtils;

import sculove.spring.framework.common.AbstractDto;

/**
 * <pre>
 * sculove.spring.zzz.login.model.UserDTO.java
 * 
 * TODO
 * 
 * </pre>
 * 
 * @date : 2009. 11. 21. 오전 12:00:21
 * @version :
 * @author : sculove
 */
public class UserDTO extends AbstractDto {
	private String userId;
	private String userName;
	private String password;
	private String language;
	
	public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	public String getPassword() {
		return password;
	}


	public void setPassword(String password) {
		this.password = password;
	}

	public String getLanguage() {
		return language;
	}


	public void setLanguage(String language) {
		this.language = language;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	@Override
	public void validate(Object target, Errors errors) {
		ValidationUtils.rejectIfEmptyOrWhitespace(errors, "userId", "required");
		ValidationUtils.rejectIfEmptyOrWhitespace(errors, "password", "required");
		ValidationUtils.rejectIfEmptyOrWhitespace(errors, "language", "required");
	}
}
